//
//  QNCPDeviceEnum.h
//  QNCPDeviceModule
//
//  Created by yolanda on 2025/6/9.
//


#pragma mark  设备类型

typedef NS_ENUM(NSUInteger, QNCPDeviceType) {
    QNCPDeviceTypeCP10N
};


#pragma mark 秤端交互过程状态
typedef NS_ENUM(NSUInteger, QNCPDeviceState) {
    
    QNCPDeviceStateUnknow = 0, //未连接
    
    QNCPDeviceStateConnecting, //正在连接
    QNCPDeviceStateConnectFail, //连接失败
    QNCPDeviceStateConnected, //连接成功
    
    QNCPDeviceStateDiscoverServices, //发现服务
    QNCPDeviceStateDiscoverCharacteristics, //发现特征
    
    QNCPDeviceStateInteractive, //开始交互
    
    QNCPDeviceStateWriteModelBegin,         //开始写入型号
    QNCPDeviceStateWriteModelSuccess,       //写入型号成功
    QNCPDeviceStateWriteModelFail,          //写入型号失败
    
    QNCPDeviceStateSynUserInfoStart, //开始同步用户信息
    QNCPDeviceStateSynUserInfoFail, //同步用户信息失败
    QNCPDeviceStateSynUserInfoSuccess, //同步用户信息成功
    
    QNCPDeviceStateRegistUserStart, //开始注册用户
    QNCPDeviceStateRegistUserFail, //注册失败
    QNCPDeviceStateRegistUserSuccess, //注册成功
    
    QNCPDeviceStateDeleteUsersStart, //开始批量删除用户
    QNCPDeviceStateDeleteUsersFail, //批量删除用户失败
    QNCPDeviceStateDeleteUsersSuccess, //批量删除用户成功
    
    QNCPDeviceStateRealTimeWeight, //实时数据
    QNCPDeviceStateMeasureBodyFat, //正在测量体脂
    QNCPDeviceStateMeasureHeartReat, //正在测量心率
    QNCPDeviceStateMeasureComplete, //测量完成
    
    QNCPDeviceStateFinishReadStorageData, //结束读取存储数据
    
    QNCPDeviceStateDisconected, //设备断开
    QNCPDeviceStateHardwareParamsError,
    
    QNCPDeviceStateUpdateIdentifyWeightFail, //更新用户识别体重失败
    QNCPDeviceStateUpdateIdentifyWeightSuccess, //更新用户识别体重成功
    
    QNCPDeviceStateUpdateScaleSettingsFail, //更新秤端设置失败
    QNCPDeviceStateUpdateScaleSettingsSuccess, //更新秤端设置成功
    
    QNCPDeviceStateSentScaleDataSuccess,     //向秤发送测量数据成功
    QNCPDeviceStateSentScaleDataFail,        //向秤发送测量数据失败
    
    QNCPDeviceStateWriteFitDataSuccess,      //写入八电极拟合数据成功（体重，节段阻抗）
    QNCPDeviceStateWriteFitDataFail,         //写入八电极拟合数据失败（体重，节段阻抗）
    
    QNCPDeviceStateEnterOTAMode,             // 开始OTA
    QNCPDeviceStateNeedOTA,             // 需要OTA，单备份OTA特有的状态（【注意】如果在单备份OTA过程中中断升级（例如主动断开蓝牙连接、关闭蓝牙开关等），那么在OTA超时前（秤面不再显示“UP”字样）再次连上设备，设备是不能正常进行公司协议指令交互的，于是会有“需要OTA”这个设备状态向外抛出）
    
    QNCPDeviceStateWriteCurveWeightDataSuccess,    //写入曲线数据成功
    QNCPDeviceStateWriteCurveWeightDataFail,      //写入曲线数据失败
};
